package com.pig4cloud.pig.module.api.entity.farm;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pig4cloud.pig.common.core.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * 农场的饲料和鸡蛋的出入记录对象 farm_feed_record
 *
 * @author ruoyi
 * @date 2022-05-14
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("farm_feed_record")
public class FarmFeedRecord implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 农场id
     */
    private Integer farmId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 记录来源  0 - 系统自动发放  1 - 签到获得  2 - 去好友农场蹭的 3 - 分享好友获得
	 * 4 - 看广告获得  5 - 自己农场生产获得  6 - 购物获得
     */
    private Integer fromType;

    /**
     * 产生记录的类型  0 - 饲料克重  1 - 鸡蛋克重  2 - 鸡蛋
     */
    private Integer recordType;

    /**
     * 看广告的商品的id
     */
    private Integer productId;


	@Excel(name = "领蛋超市")
	@TableField(exist = false)
	private String merName;

    /**
     * 获得的数量
     */
	@Excel(name = "领取数量")
    private Integer count;

    /**
     * 商家id
     */
    private Integer merId;

    /**
     * 添加时间
     */
    @TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 广告类型  0 -  商品详情  1 - 商家详情
     */
    private Integer watchType;

    /**
     * 备注信息
     */
    private String remark;

    /**
     * 用户领取鸡蛋  是否已经结算  0 - 未计算  1 - 结算中  2 - 已结算
     */
    private Integer isSettle;

    private Integer settleRecordId;


	/**
	 *  发起结算的时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date settleTime;

	/**
	 *  结算结束时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date settleOverTime;

	@TableField(exist = false)
	private String beginDate;

	@TableField(exist = false)
	private String endDate;

    @TableField(exist = false)
    private Integer isGroupByDate;

    @TableField(exist = false)
	private Integer year;


	@Excel(name = "用户昵称")
	@TableField(exist = false)
	private String nickName;

	@Excel(name = "领取日期")
	@TableField(exist = false)
	private String createDateTxt;


	@Excel(name = "领取时间")
	@TableField(exist = false)
	private String createTimeTxt;


	/**
	 * 用户主动输入的备注信息
	 */
	@Excel(name = "结算状态")
	@TableField(exist = false)
	private String settleState;

	/**
	 * 用户主动输入的备注信息
	 */
	@Excel(name = "备注信息")
	private String userRemark;

}
